<template>
  <ele-modal
    v-model="visible"
    title="就业统计报表"
    :fullscreen="true"
    :body-style="{ overflow: 'auto', maxHeight: '100%', minHeight: '100%' }"
    @close="handleClose"
  >
    <iframe
      :src="iframeUrl"
      width="100%"
      height="100%"
      scrolling='yes'
      frameborder='0'
    ></iframe>
  </ele-modal>
</template>
<script setup>
import {ref, reactive, watch} from 'vue';

/** 弹窗是否打开 */
const visible = defineModel({type: Boolean});

const iframeUrl = ref(null);

const props = defineProps({
  url: String
});

/** 关闭弹窗 */
const handleClose = () => {
  visible.value = false;
};

// const iframeUrl = ref("");

watch(visible, () => {
  if (visible.value) {
    console.log(props.url);
    iframeUrl.value = props.url;
  } else {

  }
});
</script>

<style scoped>

</style>
